home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 03 - 1987 / 03.05 May 87 / c source / abc 9 source code / cursor.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-04-07  |  566 b   |  46 lines  |  [TEXT/KAHL]

  1. #include    "abc.h"
  2. #include    "Quickdraw.h"
  3. #include    "windowMgr.h"
  4.  
  5.  
  6. short        currentcursor;
  7.  
  8.  
  9. CursorAdjust(w)
  10.     WindowRecord    *w;
  11. {
  12.     Point            pt;
  13.     CursHandle        curs;
  14.     
  15.     GetMouse(&pt);
  16.     LocalToGlobal(&pt);
  17.     if ((PtInRgn(pt,w->contRgn)) and 
  18.         (currentcursor notequal 0))
  19.         {
  20.         curs = (Cursor **)GetCursor(currentcursor);    
  21.         SetCursor(*curs); 
  22.         }
  23.     else
  24.         {
  25.         SetCursor(&arrow);
  26.         }
  27. }
  28. /*
  29. WindowSize(w,r)
  30.     WindowRecord    *w;
  31.     Rect            *r;
  32. {
  33.     BlockMove(w->portRect,r,sizeof(Rect));
  34.     */
  35. CursorInUse()
  36. {
  37.     return(currentcursor);
  38. }
  39.  
  40. CursorToUse(c)
  41.     short            c;
  42. {
  43.      currentcursor = c;
  44. }
  45.  
  46.